$('document').ready
(
    function()
    {
		// 初始化筛选框
		$('#author_list').children('option').removeAttr('selected');
		$('#author_list').children("option[value='" + author + "']").attr('selected', 'selected');
		// 初始化搜索框
		$('#ip_filter').val(ip);

		// 监听筛选框变化
		$('#author_list').change
		(
			function()
			{
				var author = $(this).val();
				switch(author)
				{
					case 'all':
						var uri = '/authed_ip_list';
						break;
					default:
						var uri = '/authed_ip_list?author=' + author;
				}
				window.location.href = URL + uri;
			}
		);
    }
);
